package com.siyu.tickets.entity.base;

import java.io.Serializable;

import com.siyu.tickets.entity.Element;
import com.siyu.tickets.entity.Product;
import com.siyu.tickets.entity.Supplier;

public abstract class BaseProduct implements Serializable {

	private static final long serialVersionUID = -479042208357317556L;

	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private Integer id;

	// fields
	private String name;
	private String cityIds;
	private String imgPhoto;

	private String smsTitle;
	private String smsTemplate;

	private String summary;
	private String detail;
	private String hint;

	private String options;
	private String delivery;// 递送方式

	private java.util.Date beginTime;
	private java.util.Date endTime;
	private java.util.Date expireTime;

	private java.math.BigDecimal partnerPrice;
	private java.math.BigDecimal productPrice;
	private java.math.BigDecimal referPrice;
	private java.math.BigDecimal marketPrice;

	private Integer maxCount;
	private Integer preCount;

	private Boolean enable;
	private Integer order;
	private java.util.Date createTime;

	private Element type;
	private Element group;
	private Supplier supplier;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCityIds() {
		return cityIds;
	}

	public void setCityIds(String cityIds) {
		this.cityIds = cityIds;
	}

	public String getImgPhoto() {
		return imgPhoto;
	}

	public void setImgPhoto(String imgPhoto) {
		this.imgPhoto = imgPhoto;
	}

	public String getSmsTitle() {
		return smsTitle;
	}

	public void setSmsTitle(String smsTitle) {
		this.smsTitle = smsTitle;
	}

	public String getSmsTemplate() {
		return smsTemplate;
	}

	public void setSmsTemplate(String smsTemplate) {
		this.smsTemplate = smsTemplate;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public String getHint() {
		return hint;
	}

	public void setHint(String hint) {
		this.hint = hint;
	}

	public String getOptions() {
		return options;
	}

	public void setOptions(String options) {
		this.options = options;
	}

	public String getDelivery() {
		return delivery;
	}

	public void setDelivery(String delivery) {
		this.delivery = delivery;
	}

	public java.util.Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(java.util.Date beginTime) {
		this.beginTime = beginTime;
	}

	public java.util.Date getEndTime() {
		return endTime;
	}

	public void setEndTime(java.util.Date endTime) {
		this.endTime = endTime;
	}

	public java.util.Date getExpireTime() {
		return expireTime;
	}

	public void setExpireTime(java.util.Date expireTime) {
		this.expireTime = expireTime;
	}

	public java.math.BigDecimal getPartnerPrice() {
		return partnerPrice;
	}

	public void setPartnerPrice(java.math.BigDecimal partnerPrice) {
		this.partnerPrice = partnerPrice;
	}

	public java.math.BigDecimal getProductPrice() {
		return productPrice;
	}

	public void setProductPrice(java.math.BigDecimal productPrice) {
		this.productPrice = productPrice;
	}

	public java.math.BigDecimal getReferPrice() {
		return referPrice;
	}

	public void setReferPrice(java.math.BigDecimal referPrice) {
		this.referPrice = referPrice;
	}

	public java.math.BigDecimal getMarketPrice() {
		return marketPrice;
	}

	public void setMarketPrice(java.math.BigDecimal marketPrice) {
		this.marketPrice = marketPrice;
	}

	public Integer getMaxCount() {
		return maxCount;
	}

	public void setMaxCount(Integer maxCount) {
		this.maxCount = maxCount;
	}

	public Integer getPreCount() {
		return preCount;
	}

	public void setPreCount(Integer preCount) {
		this.preCount = preCount;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}

	public java.util.Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(java.util.Date createTime) {
		this.createTime = createTime;
	}

	public Element getType() {
		return type;
	}

	public void setType(Element type) {
		this.type = type;
	}

	public Element getGroup() {
		return group;
	}

	public void setGroup(Element group) {
		this.group = group;
	}

	public Supplier getSupplier() {
		return supplier;
	}

	public void setSupplier(Supplier supplier) {
		this.supplier = supplier;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Product))
			return false;
		else {
			Product user = (Product) obj;
			if (null == this.getId() || null == user.getId())
				return false;
			else
				return (this.getId().equals(user.getId()));
		}
	}

	public int hashCode() {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId())
				return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}

}
